006 defining tags
嘿伙计们,让我们看看如何在 Wonder where 中设置一些标签。
Hey guys let's look at how to set up some tags inside of wonder where.
因此,实际上有一个由两部分组成的过程,我将继续向您展示其工作原理。
So there's actually a two part process to this and I'm going to go ahead and show you how that works.
当我进入项目资源管理器上的全局选项卡时,您会看到这里有我们的项目标签,然后我们有一个标签列表,显示为零。
When I come over here into global tab on my project explorer you see up here we have our project tags and then we have a tag list which says zero.
好吧,让我们继续插入一个标签。
Well let's go ahead and insert a tag.
所以我们想要的第一个标签让我们继续将其称为 P.B.
So the first tag we're going to want Let's go ahead and call it P.B.
下划线开始。
underscore start.
所以这将是我的开始按钮,其类型将是布尔值,因为它要么打开要么关闭。
So this is going to be my start push button and the type of this is going to be boolean because that's something that's either on or off.
这是数字的,我们将继续将范围保留为服务器并命中。
That's a digital and we'll go ahead and leave the scope as server and hit.
好的。
OK.
就像这样,我有一个按钮标签,这样我就可以插入另一个标签。
So just like that I've got a push button tag so I can insert another tag.
创建模拟标签怎么样?
What about creating analogue tags.
因此,让我们继续创建一个 SV 下划线坦克级别,显然我们知道我们将来会需要它,并且输入它可以是实数、整数、字符串或布尔值。
So let's go ahead and create an S V underscore tank level and obviously we know we're going to need that down the road and type this could either be a real and integer a string or a boolean.
对于我们的水箱液位来说,这将是真实的,因为我们知道我们正在使用浮子来测量缩放后的水箱液位。
And for our tank level that's going to be a real because we know that we're using a float for our scaled tank level.
所以我们就点击“确定”。
So we'll hit OK on that.
因此,我们需要的标签的另一个示例是 SUV 1 的显示状态,我将 Ajoy 下划线设置为 1,该值将是一个整数,因为您知道我们已经七点后就将其存储起来。
So one more example of a tag that we're going to need is going to be our show a status for SUV 1 and I'll just put Ajoy underscore as one and that one is going to be an integer because you know we've got that stored on in seven.
因此,如果我们点击“确定”,您可以看到我们的三个标签有三个不同的图标。
So if we hit OK you can see we've got three different icons for our three tags.
这是一种波浪线。
This one is kind of a wavy line.
它看起来像正弦波,因为它是一个浮点数。
It looks like a sine wave because that's a float.
然后我们就有了这个看起来像爬上楼梯的东西,因为它是一个整数。
Then we have this one that looks like a staircase climbing up because that's an integer.
然后我们就有了这个,你知道,它看起来像方波。
And then we have this one that kind of you know looks like a square wave.
那是因为那是数字信号。
And that's because that's a digital signal.
在项目中设置标签就成功了一半。
Setting up the tags in the project is half the battle.
但是,如果您注意到我们定义了这些标签的某些内容,我们会说这就是名称。
But if you notice something we defined those tags we said this is the name.
这就是它是什么样的标签。
And this is what kind of tag it is.
但我们从未在这些标签上实际设置过地址,也从未将它们链接到中华人民共和国境内的任何内容。
But we never actually set addresses on those tags and we never linked those to anything inside of our PRC.
那么我们该如何做到这一点,让我们来到通信选项卡,然后在我们的驱动程序下,您会看到我们有 AB K E,这是我们创建的 Alan Bradley 驱动程序。
So how do we do that let's come down here to a communications tab and then under our drivers you see we've got our AB K E that's our Alan Bradley driver that we created.
如果我们扩展的话,我们就有了这个主要的驱动表。
And if we expand that we have this main driver sheet.
如果我双击,您可以立即看到我们在这里有一个地方可以存放一些标记的名称。
And if I double click that you can see right away we've got a place over here for some tagged names.
因此,如果我来到这里,我可以右键单击它并选择插入标签。
So if I come over here I can right click on this and select insert tag.
现在我需要浏览我的标签,所以如果我单击项目,我可以看到该项目中的所有标签,或者如果我只单击布尔整数或实数和字符串(如果我们使用除我之外的任何标签)我真的不喜欢在 PC 和 HDMI 之间来回发送字符串。
And now is where I'm going to need to browse for my tags so if I click on project I can see all of my tags in this project or if I just click on Boolean integer or real and string if we were using any but I really don't like to ever send strings back and forth between the PC and the HDMI.
所以对我来说,它总是布尔值中的实字符串,你知道这可以限制。
So with me it's always going to be real string in boolean and you know that can limit.
因此,如果我有很多标签,这确实会帮助我找到一些东西。
So this will really help me find something if I've got a lot of tags.
该系统标记这些内容实际上将存储在 Wonder 中,因此这些不是我们的 PSC 标记,这些是我们最关心的内容。
This system tags these are for things that are actually going to be stored inside of wonder where so these aren't our PSC tags these are the ones that we're going to be concerned with for the most part.
我的按钮和水箱就在这里。
I've got my way my push button and my tank right here.
所以我会沿着列表进行设置。
So I'll just go down the list and get this set up.
我将从我的个人资料开始。
I'll start with my h a s v one.
我真的需要在这里设置什么。
What do I really have to set in here.
这是我的 IO 地址。
Here's my IO address.
那么让我们进入 PRC 程序看看它是什么。
So let's go into the PRC program and see what that is.
我会进入HLA。
I'll go into HLA.
而且大家都在7 0。
And as everyone is in 7 0.
那么让我们回想一下我在哪里输入了七个冒号的零。
So let's come back into wonder where and I just type in seven Colon's zero.
完全就像我在我们的逻辑中所做的那样。
Exactly like I would inside of our s logic.
那一个就完成了。
And that one is done.
这个怎么样,我可以过来一下。
What about this one I can come over here.
插入标签。
Insert tag.
让我们按下按钮开始,然后再回来看看那是什么。
Let's take my push button start and right back to find out what that was.
我可以在“审阅”选项卡上看到该内容,即 B-3 3:3。
I can see that on the Review tab and that's B-3 3:3.
因此,只需输入它,因为它看起来是三个冒号、三个斜杠、三个和一个插入标签,我们将获取油箱液位,当我记起记忆时,它也是 F-8。
So just type it in as it appears to be three colon three slash three and one more insert tag and we'll take our tank level and that when I remember off memory that one's F-8 too.
F-8 冒号也是如此。
So F-8 colon too.
我可以选择对这些内容进行操作,无论我是想读还是写。
And I can select my action on these whether I want to read it or write it.
你知道这会派上用场。
You know that could come in handy.
我通常使用屏幕上的控件来限制我是在阅读还是在写东西。
I usually use the controls on the screen to limit whether I'm reading or writing something.
但如果您愿意,您可以在这里定义它,但这确实是我们设置标签所需要做的唯一事情。
But if you wanted to you could define that here but that's really the only thing that we have to do to set up a tag.
还有其他选项,但对于我们将要使用和执行的操作,我们不需要真正高级。
There are other options but for what we're going to be using and doing we don't need to get really advanced.
我们并没有在一个大而复杂的流程中使用许多不同的系统。
We're not working with a lot of different systems in a big complex process.
因此,我们希望让事情尽可能简单,以便为您和用户提供良好的体验。
So we want to keep things as simple as we can make it a good experience for you and a good experience for the user.
就是这样了。
So that's it.
这就是你在 Wonder 中设置标签的方式,它的过程有点多,因为你必须去两个地方才能做到这一点。
That is how you set up tags inside of wonder where it's a little bit more of a process because you have to go to two places to do it.
但总而言之并不可怕。
But all in all not terrible.
如果您想进入这里,实际上只需右键单击“插入标签”,然后您就可以创建一个新标签。
And if you wanted to come in here you could actually just right click insert tag and then you could create a new tag.
所以你可以从这里完成这一切,但你实际上仍然要经历两个界面。
So you could kind of do it all from here but you're really still going through two interfaces.
不管怎样,这就是你在这里放置标签的方式。
Either way that's how you put a tag in here.
那么我们下节课见。
So see you in the next lecture.
干杯。
Cheers.